Commands Library Objects

The functions in the Command library enable you to execute the windows command, start and stop the processes.

The business entities in this library are exposed under Business Entities > Library Types > General > Process Start Information and Business Entities > Library Types > General > System Process.

The functions are exposed under Project > References > Library References > Direct.Shared.Library > Commands.

For more information about working with Start Process and Stop Process functions, see Using Command Functions.

To use these functions, create an instances of Process Start Information and System Process business entities. In the Process Start Information instance, enter the values in the required parameters to invoke the Start Process function.

The business entity Process Start Information, which is mapped to the ProcessStartInfo class of .Net, is used as an input for the Start Process function. The parameters of Process Start Information business entity are given below:

Name Data Type Description
Arguments Text

Command line arguments to be passed to the process while starting the application. See Arguments.

Example: google.com for Chrome process or /a for opening a file as ANSI.

Create No Window Boolean

This property is required to start the process in new window.

Select False to start the process in new window. Or select True. See Create No Window.

Domain Text Active Directory Domain to use while starting the process. See Domain.
Error Dialog Boolean This property enables you to display an error dialog box when the process cannot be started. See Error Dialog.
Error Dialog Parent Handle Boolean This property enables you to keep the error dialog box in front of the application. See Error Dialog Parent Handle.
File Name Text

The file name of the application or document to start. See File Name.

Example: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe or Notepad.exe

Load User Profile Boolean The windows user profile to load from the registry. Set it to True if you want to start a process using the UserName, Password, and Domain. See Load User Profile.
Password - Password for starting a process. This parameter is not exposed. The Set Password functions needs to be invoked to set the password. See Set Password.
Redirect Standard Error Boolean

To write an error output of a process to the StandardError stream. See Redirect Standard Error.

When set to true, populates Standard Error.

Redirect Standard Input Boolean To read the input of a process from the StandardInput stream. See Redirect Standard Input.
Redirect Standard Output Boolean

To write the output of a process to the StandardOutput stream. See Redirect Standard Output.

When set to true, populates Standard Output.

Standard Error Encoding Text

Encoding for the error output. See Standard Error Encoding.

See List of Encodings for the supported encoding types.

Standard Output Encoding Text

Encoding for the standard output. See Standard Output Encoding.

See List of Encodings for the supported encoding types.

Use Shell Execute Boolean To use the operating system shell to start the process. When set to True, you can start any application and perform operations on a file. When set to False, you can only start the executable files. See Use Shell Execute.
UserName Text User Name to start the process. See User Name.
Verb Text

Action to take with the file that starts the process. An empty parameter indicates no action will be performed. See Verb.

Example: print verb will print a document specified using the File Name.

Window Style Number

State of the window when the process is started. See Window Style.

Enter 0 for Normal, 1 for Hidden, 2 for Minimized, and 3 for Maximized.

Working Directory Text

When the Use Shell Execute property is True, this property requires the fully qualified name of the directory that contains the process to be started.

When the Use Shell Execute property is False, this property requires the working directory for the process to be started. See Working Directory.

The business entity System Process is required as an input for the Stop Process function. The parameters of System Process business entity are given below:

Name Data Type Description
Command Line Text Command line to stop the process.
Exited Event Gets raised when the process exits.
ID Number

ID or unique identifier of the associated process, which is required to be closed.

Is Running Boolean Signifies whether the associated process is running.

Standard Error

Text

Standard Error gets populated when Redirect Standard Error in 'Process Start Information' is set to true.

Standard Output

Text

Standard Output gets populated when Redirect Standard Output in 'Process Start Information' is set to true.

The functions are detailed below: